package edu.sctu.wangfuxin.day20150601testtrain;

/**
 * Created by user06 on 2015/6/2.
 */

/**
 * 进站包裹处理类
 */
public class BaoGuoDeth {
    private String weijin = "易燃易爆,管制刀具,有毒物质,枪械";

    private PeopleAppBean peopleappbean;

    public BaoGuoDeth(PeopleAppBean peopleappbean){
        this.peopleappbean = peopleappbean;
    }

    /**
     * 检查包裹
     */
    public boolean chaBaoGuo(){
        boolean is_weijin = false;
        if(peopleappbean.isIs_baoguo()){
            if(weijin.contains(peopleappbean.getBaoguoname())){
                is_weijin = true;
            }else {
                is_weijin = false;
            }
        }
        return is_weijin;
    }

    /**
     * 检查水
     *
     * @return
     */
    public boolean chaWater(){
        boolean is_weijin = false;
        if(peopleappbean.isIs_water()){
            if(weijin.contains(peopleappbean.getWatername())){
                is_weijin = true;
            }
        }else{
            is_weijin = false;
        }

        return is_weijin;
    }
}
